Customization of Mobile Applications Using Web-Based Technology

ABSTRACT

In one embodiment, receiving, at a first computing device from a second computing device, a request for a view of a user interface of a native application executing on the second computing device, wherein the view includes one or more first user interface components; determining, by the first computing device, a user agent type of the second computing device; selecting, by the first computing device, one or more second user-interface components to be included in the view based on the user agent type of the second computing device; generating, by the first computing device, code implementing a structured document that represents the view, wherein the structured document comprises the one or more first user-interface components and the one or more second user-interface components; and transmitting, from the first computing device to the second computing device, the code.

TECHNICAL FIELD

The present disclosure generally relates to customizing nativeapplications for mobile devices and more specifically relates toimplementing native applications for mobile devices that do not requirethe user interfaces of the native applications to be implementedentirely in native code.

BACKGROUND

Sophisticated mobile devices are able to support many softwareapplications. A mobile device, such as a tablet or netbook computer, asmart phone (e.g., Apple iPhone and RIM BlackBerry), or a personaldigital assistant (PDA), usually has its own operating system and a setof software applications that enables its user to perform manyactivities. For example, with a mobile device having the necessarysoftware applications installed thereon, a user may access web pagesusing a web browser application, read and send emails using an emailapplication, read and edit documents using a word processor application,receive direction and location information using a GPS application, andtake digital photos using a photo or imaging application.

SUMMARY

The present disclosure generally relates to customizing nativeapplications for mobile devices and more specifically relates toimplementing native applications for mobile devices that do not requirethe user interfaces of the native applications to be implementedentirely in native code.

In particular embodiments, receiving, at a first computing device from asecond computing device, a request for a view of a user interface of anative application executing on the second computing device, wherein theview includes one or more first user interface components; determining,by the first computing device, a user agent type of the second computingdevice; selecting, by the first computing device, one or more seconduser-interface components to be included in the view based on the useragent type of the second computing device; generating, by the firstcomputing device, code implementing a structured document thatrepresents the view, wherein the structured document comprises the oneor more first user-interface components and the one or more seconduser-interface components; and transmitting, from the first computingdevice to the second computing device, the code.

These and other features, aspects, and advantages of the disclosure aredescribed in more detail below in the detailed description and inconjunction with the following figures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example system for a native application to have aweb-based user interface.

FIG. 2 illustrates an example method for a native application to have aweb-based user interface.

FIG. 3 illustrates an example network environment.

FIG. 4 illustrates an example computer system.

FIG. 5 illustrates an example user interface.

DESCRIPTION OF EXAMPLE EMBODIMENTS

The present disclosure is now described in detail with reference to afew embodiments thereof as illustrated in the accompanying drawings. Inthe following description, numerous specific details are set forth inorder to provide a thorough understanding of the present disclosure.However, the present disclosure may be practiced without some or all ofthese specific details. In other instances, well known process stepsand/or structures have not been described in detail in order not tounnecessarily obscure the present disclosure. In addition, while thedisclosure is described in conjunction with the particular embodiments,it should be understood that this description is not intended to limitthe disclosure to the described embodiments. To the contrary, thedescription is intended to cover alternatives, modifications, andequivalents as may be included within the spirit and scope of thedisclosure as defined by the appended claims.

In general, there are two types of software applications. One type ofsoftware application may be referred to as “native applications”.Examples of the native applications may include Microsoft Office Suite,Adobe Creative Suite, and Symantec Norton 360™. Native applications areusually developed for specific computing devices having specificoperating systems and need to be installed on the computing devicesbefore they can be executed. Often, a native application developed forone type of computing device having one type of operating system cannotbe readily installed for execution on another type of computing devicehaving another type operating system. For example, a camera applicationdeveloped for the Motorola Droid mobile telephones with the GoogleAndroid operating system may not be readily installed on an Apple iPhonewithout some code modification. This is because such native applicationsmay have code that is platform dependent (i.e., native code).Platform-dependent code depends on the specific programming languagefeatures or libraries of a particular operating system or specifichardware components or capabilities of a particular mobile device.Consequently, native applications are platform dependent as well, whichmeans developers of a native application may need to implement severalversions of the same application for different computing devices anddifferent operating systems. The user interface (UI) of a nativeapplication may have any number of displayable views, and each view mayinclude any number of UI components. Each view may be individuallydisplayed within the context the native application.

In contrast, another type of software application may be referred to as“web-based applications”. Unlike native applications, web-basedapplications are not installed locally on the specific computingdevices. Instead, a web-based application usually executes on a remoteserver, which may be accessible to any number of computing devices(i.e., client devices) simultaneously via a network. Each web-basedapplication may be hosted at a particular website and has a uniqueUniform Resource Locator (URL) with which it may be accessed. Examplesof the web-based applications may include those applications located atwww.facebook.com, www.amazon.com, and www.expedia.com. The server andthe client devices may communicate using any suitable communicationprotocol, such as Hypertext Transfer Protocol (HTTP). Usually, the userinterface of a web-based application is implemented as a series of webpages, which may be loaded and displayed in a web browser executing on aclient device. The input to the web-based application is received at theclient device and transmitted to the server for processing. The outputof the web-based application is transmitted from the server to theclient device to be displayed in the web browser. Because the web-basedapplications mainly execute on the servers instead of on the individualclient devices (which host browser clients), they do not depend on anysoftware or hardware features of the specific client devices. Therefore,they are not platform dependent. A web-based application executing on aserver may be accessible to different types of client devices havingdifferent types of operating systems and browser clients.

Both native applications and web-based applications have certaindisadvantages. For example, different versions of a native applicationneed to be implemented for different computing devices and operatingsystems. On the other hand, there are certain features orfunctionalities that cannot be supported by a web-based applicationbecause they require native features provided by a specific operatingsystem or a specific device.

Particular embodiments provide a convenient way to develop nativeapplications by enabling a native application to incorporate a web-baseduser interface. As a result, portions of the code implementing the userinterface of the native application does not need to be written asnative code (i.e., platform-dependent code). Although different versionsof the native application may still need to be developed for differentcomputing devices and operating systems, a large segment of the userinterface portion of the code only needs to be implemented once and maybe used with all versions of the native application.

FIG. 1 illustrates an example system 100 for a native application toincorporate a web-based user interface. In particular embodiments, acomputing device 110, such as a desktop computer or a mobile device, hasa native application 112 and a web browser 111. In addition, inparticular embodiments, computing device 110 may also have an operationsystem (not shown). In particular embodiments, computing device 110 mayinclude hardware, software, or embedded logic components or acombination of two or more such components for carrying out theappropriate functionalities implemented or supported by computing device110. In particular embodiments, native application 112 may be written inany computing programming language and may be executed on computingdevice 110. In particular embodiments, if computing devices has anoperation system, native application 112 may be executed within thecontext of the operating system. In particular embodiments, a server 120has a UI library 121 that includes various UI-related functions. Inparticular embodiments, server 120 may include hardware, software, orembedded logic components or a combination of two or more suchcomponents for carrying out the appropriate functionalities implementedor supported by server 120. In particular embodiments, UI library 121may be implemented using any suitable programming language, such as aserver-side scripting language (e.g., PHP). In particular embodiments,UI library 121 may provide an application programming interface (API) sothat its functions may be invoked via API calls. In particularembodiments, computing device 110 and server 120 may communicate witheach other via a computer network using any suitable communicationprotocol, such as HTTP.

In particular embodiments, native application 112 has a user interface,as FIG. 5 illustrates. In particular embodiments, at least a portion ofthe code implementing the user interface of native application 112 isnot native code compiled for computing device 110 and installed oncomputing device 110. Instead, in particular embodiments, when selectedportions of the user interface of native application 112 are displayed,native application 112 makes appropriate API calls to UI library 121residing on server 120 to invoke the appropriate library functionscontained in UI library 121. Each API call may be transmitted fromcomputing device 110 to server 120 using any suitable communicationprotocol, such as HTTP. In particular embodiments, upon receiving an APIcall from computing device 110, UI library 121, or more specifically,the functions invoked by the API call may generate the appropriate code(i.e., UI code), such as code written in a client-side scriptinglanguage that may be directly interpreted by a web browser (e.g., HTML,XML, and/or JavaScript), that implements all or a portion of the userinterface of native application 112, and transmits the UI code tocomputing device 110. Again, the UI code may be transmitted from server120 to computing device 110 using any suitable communication protocol,such as HTTP. Computing device 110, after receiving the UI code fromserver 120, may load the UI code in web browser 111. In particularembodiments, web browser 111 may be executed and rendered within thecontext of native application 112 so that the user interface of nativeapplication 112 is rendered and displayed within the context of nativeapplication 112. Alternatively, in particular embodiments, nativeapplication 112 may include native code that is capable of rendering theUI code received from server 120 to display the user interface of nativeapplication 112 without the need of a separate web browser (e.g., webbrowser 111).

FIG. 2 illustrates an example method for a native application to have aweb-based user interface. In particular embodiments, some of the stepsillustrated in FIG. 2 may be performed by a client device (e.g., amobile device) having an operating system, a native application, and aweb browser, and some of the steps illustrated in FIG. 2 may beperformed by a server having a UI library.

In particular embodiments, a native application executing on a clientmay need to display its user interface. The native application, throughthe client, may transmit an API call to a server having a UI library, asillustrated in STEP 211. The API call may be in the form of a HTTPrequest that invokes an appropriate function included in the UI libraryresiding on the server. In one implementation, the HTTP request includesa user agent identifier that allows the server to identify theparticular application making the request in order to distinguishbetween a standard browser client and the native application making therequest. In particular embodiments, the UI library, upon receiving theAPI call, may generate appropriate code implementing the user interfaceof the native application, as illustrated in STEP 221.

In particular embodiments, the user interface of the native applicationmay include any number of displayable views, and each displayable viewmay be implemented, at least in part, as a web page or other structureddocument. As FIG. 5 illustrates, for example, the user interface mayinclude a first portion 502 that is natively rendered by the applicationby making appropriate calls into the operating system, and additionalportions 504, 506 that may be browser-based renderings of structureddocuments returned by a remote server. In particular embodiments, eachweb page may include various UI components, such as icons 510, panels,menus, text fields, check boxes, buttons 508, graphical components, etc.In particular embodiments, each web page may include a standard set ofUI components that is the same regardless of on which platform (e.g.,the type of client and the operating system executing on the client) thenative application executes. In other words, this standard set of UIcomponents is platform independent. The standard set of UI componentsmay be selected based on the specification or design requirements of thenative application. When generating the code for a web page, appropriatecode is generated to implement each UI component from the standard setof UI components.

In particular embodiments, in addition to the standard set of UIcomponents, a web page may also include a customized set of UIcomponents that may vary depending on the platform (e.g., the type ofclient and the operating system executing on the client) the nativeapplication executes. In other words, this optional, customized set ofUI components is platform dependent. For example, if the nativeapplication executes on a mobile telephone that includes a built-incamera, the web page may include a button that, when clicked, causes adigital photograph to be taken by the build-in camera included with themobile telephone. In this case, the customized set of UI componentsincluded in the web page may include the camera button. On the otherhand, if the native application executes on a mobile telephone that doesnot include a built-in camera, the camera button 508 may not be includedin the web page. In particular embodiments, the UI library may determinethe type of client device from which the API call is received and selectthe customized set of UI components to be included in the web page basedon the device type of the client transmitting the API call, asillustrated in STEP 221. When generating the code for a web page,appropriate code is generated to implement each UI component from thecustomized set of UI components, if any exists. In one implementation,the server can decide which UI code to include in a web page thatresponds to the request based on a user agent identifier. For example,if the user agent identifies a standard browser, then the server may notadd code that would render to a camera button; however, if the useragent identifies a native application hosted on a mobile device, codefor rendering a camera button 508 on the phone may be included in theresponse. Alternatively, in particular embodiments, the customized setof UI components may be determined based on an identifier associatedwith the request or the native application.

In particular embodiments, the code implementing the web page that is apart of the user interface of the native application (i.e., the UI code)may be written in a language that can be directly interpreted andprocessed by a web browser, such as a client-side scripting language(e.g., JavaScript), HTML, and/or XML. In particular embodiments, the UIlibrary, through the server, may transmit the UI code to the client, asillustrated in STEP 222.

In particular embodiments, each UI component, whether standard orcustomized, in the web page may be implemented as a separate HTMLelement and includes an encoded clickable link or region (e.g., an URL).In particular embodiments, the URL may be customized for each individualUI component based on the functionalities associated with that UIcomponent. In particular embodiments, a URL associated with a particularUI component may be an URL referring to a resource on the server or maybe a custom URL. A custom uniform resource locator is a reference thenative application registers with the operating system. Morespecifically, the custom uniform resource locator is operable, whenprocessed by a browser hosted on a client device 111, to launch thenative application. For example, a custom URL can comprise“faceweb://facebook.com/home.php?control=camera” If such a standard URL(e.g., http://www.facebook.com/places.php) is clicked by a user, thecorresponding resource on the server may be invoked. In particularembodiments, each clickable URL may correspond to a function in the UIlibrary on the server or a link to a network resource. If a user of thenative application interacts with the UI component by clicking on thecomponent (activating its associated URL), a HTTP request may be sent tothe server to invoke the library function or load the network resourcecorresponding to the clicked URL. In particular embodiments, the HTTPrequest may include any number of parameters specifically relevant tothe UI component that has been acted upon by the user. For example,suppose the server is associated with the Facebook social-networkingsystem. A user click on a custom URL associated with a particular UIcomponent, however, may be intercepted and handled by the nativeapplication. Still further, in some implementations, the custom URL maybe included in an embedded or inline reference that causes the nativeapplication to intercept the request on the initial page load, asopposed to a user click or other activation, and call into the operatingsystem to perform the operation associated with the user interfacecontrol. In one implementation, the native application registers a callback function for all click events so that the native application canintercept and filter onClick events. In some implementations, othermethods for distinguishing between URLs exists, such as encoding anindicator in the parameter field of a standard URL that the nativeapplication can recognize as a request to intercept and handle locally.

Upon receiving the UI code from the server, the native application mayload the UI code in a web browser executing on the client to display theuser interface, as illustrated in STEP 212. In particular embodiments,the web browser may be executed within the context of the nativeapplication so that the web page, which is a part of the user interfaceof the native application, is rendered and displayed within the contextof the native application. Alternatively, in particular embodiments, thenative application may include code that is capable of processing the UIcode to render the web page for display within the context of the nativeapplication. In this case, the native application in fact implements thefunctionalities of a web browser so that it does not require a separateweb browser for processing the UI code to display the web page.

In general, a user interface of an application, whether native orweb-based, enables its users to interact with the application, such asproviding input to the application and receiving output from theapplication. This is achieved using various UI components. For example,a user may provide text input to an application through a text inputfield, or click a button or a check box, or select a menu item, and soon. Each user action in connection with a UI component may result in anevent to be generated. In particular embodiments, the native applicationmay monitor the events resulted from a user interacting with thespecific UI components included in each web page.

In particular embodiments, upon receiving a user input resulted from auser of the native application interacting with one of the UI componentsincluded in a web page, as illustrated in STEP 213, the nativeapplication may determine whether the user input should be processednatively (i.e., locally at the client by the native application itself),as illustrated in STEP 214. In particular embodiments, a user inputshould be processed natively if processing of and responding to the userinput requires features of functionalities only available at the client,such as library functions provided by the operating system of the clientor hardware components included with the client. In other words, a userinput should be processed natively if processing of the user inputrequires native code that is not generally available on a server. Forexample, if the user clicks the camera button that causes a digitalphotograph to be taken by the build-in camera of a mobile telephone, theuser input should be processed natively since it requires the usage andfunctionalities of the build-in camera. On the other hand, if the usersubmits a text message to be posted on a blog, it is not necessary toprocess the user input natively since it does not require any specialfeatures that are only available through the operating system of theclient or hardware components included with the client. As discussedabove, this decisional step is aided by encoding the URLs thatcorrespond to the various UI elements with custom URL identifiers orother parameters.

As described above, in particular embodiments, each web page may includea standard set of UI components and optionally a customized set of UIcomponents. The standard set of UI components is included in the webpage regardless of the type of platform on which the native applicationexecutes. Therefore, these standard UI components are platformindependent. The customized set of UI components is selected based onthe specific type of platform (e.g., the hardware components and theoperating system of the client) on which the native applicationexecutes. Therefore, these customized UI components are platformdependent. In particular embodiments, if a user input results from theuser interacting with a standard UI component, the user input does notneed to be processed natively at the client and may be processed at theserver. If a user input results from the user interacting with acustomized UI component, the user input needs to be processed nativelyat the client (e.g., by the native application itself).

In particular embodiments, if the user input needs to be processednatively (STEP 214-YES), then the native application processes the inputat the client (e.g., with native code included with the nativeapplication), as illustrated in STEP 215. For example, if a user clickson a camera button, the native application intercepts the request andmakes calls to the operating system to launch a camera application andinterface. On the other hand, if the user input may be processed at theserver (STEP 214-NO), then the native application transmits the userinput to the server for processing, as illustrated in STEP 216. Theserver, upon receiving the user input, may process it accordingly, asillustrated in STEP 223.

In particular embodiments, when a user input is transmitted to theserver to be processed as a HTTP request, the HTTP request may includevarious parameters or arguments that are specifically relevant to the UIcomponent being acted upon by the user. For example, the HTTP requestmay include an API call to the UI library. The server may parse the HTTPrequest to extract the API call, and then forward the API call to the UIlibrary to invoke the corresponding function. Similarly, the custom URLthat corresponds to a native UI component function may also include oneor more parameters that the native application may use, such asincluding the parameters with an API call to the native operatingsystem.

In particular embodiments, the steps illustrated in FIG. 2 may berepeated as needed so that different web pages of the user interface maybe rendered and displayed on the client and different user inputs may beprocessed. For example, a user input may cause the current view of theuser interface to change to another view. In this case, a second requestmay be transmitted from the client to the server for the new view of theuser interface. The server may generate code implementing a second webpage representing the new view and transmit the code to the client to beloaded in the web browser so that the second web page may be displayedwithin the context of the native application. By having the codeimplementing the user interface of the native application generated atthe server, the user interface of the native application does not needto be implemented with native code. Consequently, the same version ofthe code implementing the user interface of the native application maybe used with different versions of the native application for differentplatforms.

In particular embodiments, the client may cache locally some of theinformation relevant to the native application. For example, the clientmay cache some of the web page code (e.g., JavaScript or HTML code)generated by the server so that it may be loaded directly into the webbrowser when needed without having to request for the code from theserver again. In particular embodiments, the client may pre-fetch someof the code implementing the user interface of the native application toimprove the performance of the native application.

In particular embodiments, the method illustrated in FIG. 2 may beincorporated with a web-based application that implements asocial-networking system. A social network, in general, is a socialstructure made up of entities, such as individuals or organizations,that are connected by one or more types of interdependency orrelationships, such as friendship, kinship, common interest, financialexchange, dislike, or relationships of beliefs, knowledge, or prestige.In more recent years, social networks have taken advantage of theInternet. There are social-networking systems existing on the Internetin the form of social-networking websites. Such social-networkingwebsites enable their members, who are commonly referred to as websiteusers, to perform various social activities. For example, thesocial-networking website operated by Facebook, Inc. at“www.facebook.com” enables its users to communicate with their friendsvia emails, instant messages, or blog postings, organize social events,share photos, receive news of their friends or interesting events, playgames, etc.

Users of a social-networking system may access the correspondingsocial-networking website via their associated client devices. Inparticular embodiments, if a user's client device has special featuresthat are not generally available through the social-networking system,such as a built-in digital camera that can take digital photographs andupload these digital photographs to the social-networking system, abuilt-in or attached webcam that can take digital videos or providevideo conferencing, or an audio recorder that can record digital audios,the UI components supporting these native features may be included inthe individual web pages of the user interface of the social-networkingsystem. If the user interacts with such a UI component to use a nativefeature, the user input may be intercepted and processed by a nativeapplication residing on the client device, instead of being transmittedto the server where the social-networking system resides. Other nativefeatures can also be accessed, such as a local file system, camera,native geo-location information, address book contacts, and the like.

Furthermore, in one implementation, the web pages returned to the nativeapplications, when processed, can also cause the native applications toperform one or more operations independent of user clicks. For example,the custom URLs can be embedded as in-line references, that whenprocessed by a browser component automatically generate outgoingrequests that are intercepted by the native application and processed.In this manner, the web server via a structured document can make callsinto a native application hosted on a client device, such as a mobilephone. For example, the web page may include a custom URL that causesthe native application to download a file (identified in the parameterstring of the URL) and store it as a file in the file system of theclient device. Similar commands can be used to later access the storedfile as well.

Particular embodiments may be implemented in a network environment. FIG.3 illustrates an example network environment 300 suitable for providingsoftware validation as a service. Network environment 300 includes anetwork 310 coupling one or more servers 320 and one or more clients 330to each other. In particular embodiments, network 310 is an intranet, anextranet, a virtual private network (VPN), a local area network (LAN), awireless LAN (WLAN), a wide area network (WAN), a metropolitan areanetwork (MAN), a portion of the Internet, or another network 310 or acombination of two or more such networks 310. The present disclosurecontemplates any suitable network 310.

One or more links 350 couple a server 320 or a client 330 to network310. In particular embodiments, one or more links 350 each includes oneor more wireline, wireless, or optical links 350. In particularembodiments, one or more links 350 each includes an intranet, anextranet, a VPN, a LAN, a WLAN, a WAN, a MAN, a portion of the Internet,or another link 350 or a combination of two or more such links 350. Thepresent disclosure contemplates any suitable links 350 coupling servers320 and clients 330 to network 310.

In particular embodiments, each server 320 may be a unitary server ormay be a distributed server spanning multiple computers or multipledatacenters. Servers 320 may be of various types, such as, for exampleand without limitation, web server, news server, mail server, messageserver, advertising server, file server, application server, exchangeserver, database server, or proxy server. In particular embodiments,each server 320 may include hardware, software, or embedded logiccomponents or a combination of two or more such components for carryingout the appropriate functionalities implemented or supported by server320. For example, a web server is generally capable of hosting websitescontaining web pages or particular elements of web pages. Morespecifically, a web server may host HTML files or other file types, ormay dynamically create or constitute files upon a request, andcommunicate them to clients 330 in response to HTTP or other requestsfrom clients 330. A mail server is generally capable of providingelectronic mail services to various clients 330. A database server isgenerally capable of providing an interface for managing data stored inone or more data stores.

In particular embodiments, a server 320 may include a UI library 322. Inparticular embodiments, UI library 322 may include various functions andbe implemented using any suitable programming language. In particularembodiments, UI library 322 may implement some of the steps illustratedin FIG. 2.

In particular embodiments, one or more data storages 340 may becommunicatively linked to one or more severs 320 via one or more links350. In particular embodiments, data storages 340 may be used to storevarious types of information. In particular embodiments, the informationstored in data storages 340 may be organized according to specific datastructures. In particular embodiment, each data storage 340 may be arelational database. Particular embodiments may provide interfaces thatenable servers 320 or clients 330 to manage, e.g., retrieve, modify,add, or delete, the information stored in data storage 340.

In particular embodiments, each client 330 may be an electronic deviceincluding hardware, software, or embedded logic components or acombination of two or more such components and capable of carrying outthe appropriate functionalities implemented or supported by client 330.For example and without limitation, a client 330 may be a desktopcomputer system, a notebook computer system, a netbook computer system,a handheld electronic device, or a mobile telephone. The presentdisclosure contemplates any suitable clients 330. A client 330 mayenable a network user at client 330 to access network 330. A client 330may enable its user to communicate with other users at other clients330.

A client 330 may have a web browser 332, such as MICROSOFT INTERNETEXPLORER, GOOGLE CHROME or MOZILLA FIREFOX, and may have one or moreadd-ons, plug-ins, or other extensions, such as TOOLBAR or YAHOOTOOLBAR. A user at client 330 may enter a Uniform Resource Locator (URL)or other address directing the web browser 332 to a server 320, and theweb browser 332 may generate a Hyper Text Transfer Protocol (HTTP)request and communicate the HTTP request to server 320. Server 320 mayaccept the HTTP request and communicate to client 330 one or more HyperText Markup Language (HTML) files responsive to the HTTP request. Client330 may render a web page based on the HTML files from server 320 forpresentation to the user. The present disclosure contemplates anysuitable web page files. As an example and not by way of limitation, webpages may render from HTML files, Extensible Hyper Text Markup Language(XHTML) files, or Extensible Markup Language (XML) files, according toparticular needs. Such pages may also execute scripts such as, forexample and without limitation, those written in JAVASCRIPT, JAVA,MICROSOFT SILVERLIGHT, combinations of markup language and scripts suchas AJAX (Asynchronous JAVASCRIPT and XML), and the like. Herein,reference to a web page encompasses one or more corresponding web pagefiles (which a browser may use to render the web page) and vice versa,where appropriate.

In particular embodiments, a client 330 may include a native application334. In particular embodiments, native application 334 may beimplemented using any suitable programming language. In particularembodiments, native application 334 may include a user interface that isnot implemented using native code. Instead, the code implementing theuser interface of native application 334 is generated by UI library 322and transmitted to native application 334 when needed. Nativeapplication 334 loads the code received from UI library 322 in webbrowser 332, which is executed within the context of native application334, so that the corresponding displayable view of its user interfacemay be displayed within the context of native application 334. Inparticular embodiments, native application 334 may implement some of thesteps illustrated in FIG. 2.

Particular embodiments may be implemented on one or more computersystems. FIG. 4 illustrates an example computer system 400. Inparticular embodiments, one or more computer systems 400 perform one ormore steps of one or more methods described or illustrated herein. Inparticular embodiments, one or more computer systems 400 providefunctionality described or illustrated herein. In particularembodiments, software running on one or more computer systems 400performs one or more steps of one or more methods described orillustrated herein or provides functionality described or illustratedherein. Particular embodiments include one or more portions of one ormore computer systems 400.

This disclosure contemplates any suitable number of computer systems400. This disclosure contemplates computer system 400 taking anysuitable physical form. As example and not by way of limitation,computer system 400 may be an embedded computer system, a system-on-chip(SOC), a single-board computer system (SBC) (such as, for example, acomputer-on-module (COM) or system-on-module (SOM)), a desktop computersystem, a laptop or notebook computer system, an interactive kiosk, amainframe, a mesh of computer systems, a mobile telephone, a personaldigital assistant (PDA), a server, or a combination of two or more ofthese. Where appropriate, computer system 400 may include one or morecomputer systems 400; be unitary or distributed; span multiplelocations; span multiple machines; or reside in a cloud, which mayinclude one or more cloud components in one or more networks. Whereappropriate, one or more computer systems 400 may perform withoutsubstantial spatial or temporal limitation one or more steps of one ormore methods described or illustrated herein. As an example and not byway of limitation, one or more computer systems 400 may perform in realtime or in batch mode one or more steps of one or more methods describedor illustrated herein. One or more computer systems 400 may perform atdifferent times or at different locations one or more steps of one ormore methods described or illustrated herein, where appropriate.

In particular embodiments, computer system 400 includes a processor 402,memory 404, storage 406, an input/output (I/O) interface 408, acommunication interface 410, and a bus 412. Although this disclosuredescribes and illustrates a particular computer system having aparticular number of particular components in a particular arrangement,this disclosure contemplates any suitable computer system having anysuitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 402 includes hardware for executinginstructions, such as those making up a computer program. As an exampleand not by way of limitation, to execute instructions, processor 402 mayretrieve (or fetch) the instructions from an internal register, aninternal cache, memory 404, or storage 406; decode and execute them; andthen write one or more results to an internal register, an internalcache, memory 404, or storage 406. In particular embodiments, processor402 may include one or more internal caches for data, instructions, oraddresses. The present disclosure contemplates processor 402 includingany suitable number of any suitable internal caches, where appropriate.As an example and not by way of limitation, processor 402 may includeone or more instruction caches, one or more data caches, and one or moretranslation lookaside buffers (TLBs). Instructions in the instructioncaches may be copies of instructions in memory 404 or storage 406, andthe instruction caches may speed up retrieval of those instructions byprocessor 402. Data in the data caches may be copies of data in memory404 or storage 406 for instructions executing at processor 402 tooperate on; the results of previous instructions executed at processor402 for access by subsequent instructions executing at processor 402 orfor writing to memory 404 or storage 406; or other suitable data. Thedata caches may speed up read or write operations by processor 402. TheTLBs may speed up virtual-address translation for processor 402. Inparticular embodiments, processor 402 may include one or more internalregisters for data, instructions, or addresses. The present disclosurecontemplates processor 402 including any suitable number of any suitableinternal registers, where appropriate. Where appropriate, processor 402may include one or more arithmetic logic units (ALUs); be a multi-coreprocessor; or include one or more processors 402. Although thisdisclosure describes and illustrates a particular processor, thisdisclosure contemplates any suitable processor.

In particular embodiments, memory 404 includes main memory for storinginstructions for processor 402 to execute or data for processor 402 tooperate on. As an example and not by way of limitation, computer system400 may load instructions from storage 406 or another source (such as,for example, another computer system 400) to memory 404. Processor 402may then load the instructions from memory 404 to an internal registeror internal cache. To execute the instructions, processor 402 mayretrieve the instructions from the internal register or internal cacheand decode them. During or after execution of the instructions,processor 402 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor402 may then write one or more of those results to memory 404. Inparticular embodiments, processor 402 executes only instructions in oneor more internal registers or internal caches or in memory 404 (asopposed to storage 406 or elsewhere) and operates only on data in one ormore internal registers or internal caches or in memory 404 (as opposedto storage 406 or elsewhere). One or more memory buses (which may eachinclude an address bus and a data bus) may couple processor 402 tomemory 404. Bus 412 may include one or more memory buses, as describedbelow. In particular embodiments, one or more memory management units(MMUs) reside between processor 402 and memory 404 and facilitateaccesses to memory 404 requested by processor 402. In particularembodiments, memory 404 includes random access memory (RAM). This RAMmay be volatile memory, where appropriate Where appropriate, this RAMmay be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, whereappropriate, this RAM may be single-ported or multi-ported RAM. Thepresent disclosure contemplates any suitable RAM. Memory 404 may includeone or more memories 404, where appropriate. Although this disclosuredescribes and illustrates particular memory, this disclosurecontemplates any suitable memory.

In particular embodiments, storage 406 includes mass storage for data orinstructions. As an example and not by way of limitation, storage 406may include an HDD, a floppy disk drive, flash memory, an optical disc,a magneto-optical disc, magnetic tape, or a Universal Serial Bus (USB)drive or a combination of two or more of these. Storage 406 may includeremovable or non-removable (or fixed) media, where appropriate. Storage406 may be internal or external to computer system 400, whereappropriate. In particular embodiments, storage 406 is non-volatile,solid-state memory. In particular embodiments, storage 406 includesread-only memory (ROM). Where appropriate, this ROM may bemask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM),electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM),or flash memory or a combination of two or more of these. Thisdisclosure contemplates mass storage 406 taking any suitable physicalform. Storage 406 may include one or more storage control unitsfacilitating communication between processor 402 and storage 406, whereappropriate. Where appropriate, storage 406 may include one or morestorages 406. Although this disclosure describes and illustratesparticular storage, this disclosure contemplates any suitable storage.

In particular embodiments, I/O interface 408 includes hardware,software, or both providing one or more interfaces for communicationbetween computer system 400 and one or more I/O devices. Computer system400 may include one or more of these I/O devices, where appropriate. Oneor more of these I/O devices may enable communication between a personand computer system 400. As an example and not by way of limitation, anI/O device may include a keyboard, keypad, microphone, monitor, mouse,printer, scanner, speaker, still camera, stylus, tablet, touch screen,trackball, video camera, another suitable I/O device or a combination oftwo or more of these. An I/O device may include one or more sensors.This disclosure contemplates any suitable I/O devices and any suitableI/O interfaces 408 for them. Where appropriate, I/O interface 408 mayinclude one or more device or software drivers enabling processor 402 todrive one or more of these I/O devices. I/O interface 408 may includeone or more I/O interfaces 408, where appropriate. Although thisdisclosure describes and illustrates a particular I/O interface, thisdisclosure contemplates any suitable I/O interface.

In particular embodiments, communication interface 410 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 400 and one or more other computer systems 400 or one ormore networks. As an example and not by way of limitation, communicationinterface 410 may include a network interface controller (NIC) ornetwork adapter for communicating with an Ethernet or other wire-basednetwork or a wireless NIC (WNIC) or wireless adapter for communicatingwith a wireless network, such as a WI-FI network. This disclosurecontemplates any suitable network and any suitable communicationinterface 410 for it. As an example and not by way of limitation,computer system 400 may communicate with an ad hoc network, a personalarea network (PAN), a local area network (LAN), a wide area network(WAN), a metropolitan area network (MAN), or one or more portions of theInternet or a combination of two or more of these. One or more portionsof one or more of these networks may be wired or wireless. As anexample, computer system 400 may communicate with a wireless PAN (WPAN)(such as, for example, a BLUETOOTH WPAN), a WI-FI network, a WI-MAXnetwork, a cellular telephone network (such as, for example, a GlobalSystem for Mobile Communications (GSM) network), or other suitablewireless network or a combination of two or more of these. Computersystem 400 may include any suitable communication interface 410 for anyof these networks, where appropriate. Communication interface 410 mayinclude one or more communication interfaces 410, where appropriate.Although this disclosure describes and illustrates a particularcommunication interface, this disclosure contemplates any suitablecommunication interface.

In particular embodiments, bus 412 includes hardware, software, or bothcoupling components of computer system 400 to each other. As an exampleand not by way of limitation, bus 412 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a Micro ChannelArchitecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, aPCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA)bus, a Video Electronics Standards Association local (VLB) bus, oranother suitable bus or a combination of two or more of these. Bus 412may include one or more buses 412, where appropriate. Although thisdisclosure describes and illustrates a particular bus, this disclosurecontemplates any suitable bus or interconnect.

Herein, reference to a computer-readable storage medium encompasses oneor more non-transitory, tangible computer-readable storage mediapossessing structure. As an example and not by way of limitation, acomputer-readable storage medium may include a semiconductor-based orother integrated circuit (IC) (such, as for example, afield-programmable gate array (FPGA) or an application-specific IC(ASIC)), a hard disk, an HDD, a hybrid hard drive (HHD), an opticaldisc, an optical disc drive (ODD), a magneto-optical disc, amagneto-optical drive, a floppy disk, a floppy disk drive (FDD),magnetic tape, a holographic storage medium, a solid-state drive (SSD),a RAM-drive, a SECURE DIGITAL card, a SECURE DIGITAL drive, or anothersuitable computer-readable storage medium or a combination of two ormore of these, where appropriate. Herein, reference to acomputer-readable storage medium excludes any medium that is noteligible for patent protection under 35 U.S.C. §101. Herein, referenceto a computer-readable storage medium excludes transitory forms ofsignal transmission (such as a propagating electrical or electromagneticsignal per se) to the extent that they are not eligible for patentprotection under 35 U.S.C. §101. A computer-readable non-transitorystorage medium may be volatile, non-volatile, or a combination ofvolatile and non-volatile, where appropriate.

This disclosure contemplates one or more computer-readable storage mediaimplementing any suitable storage. In particular embodiments, acomputer-readable storage medium implements one or more portions ofprocessor 402 (such as, for example, one or more internal registers orcaches), one or more portions of memory 404, one or more portions ofstorage 406, or a combination of these, where appropriate. In particularembodiments, a computer-readable storage medium implements RAM or ROM.In particular embodiments, a computer-readable storage medium implementsvolatile or persistent memory. In particular embodiments, one or morecomputer-readable storage media embody software. Herein, reference tosoftware may encompass one or more applications, bytecode, one or morecomputer programs, one or more executables, one or more instructions,logic, machine code, one or more scripts, or source code, and viceversa, where appropriate. In particular embodiments, software includesone or more application programming interfaces (APIs). This disclosurecontemplates any suitable software written or otherwise expressed in anysuitable programming language or combination of programming languages.In particular embodiments, software is expressed as source code orobject code. In particular embodiments, software is expressed in ahigher-level programming language, such as, for example, C, Perl, or asuitable extension thereof. In particular embodiments, software isexpressed in a lower-level programming language, such as assemblylanguage (or machine code). In particular embodiments, software isexpressed in JAVA. In particular embodiments, software is expressed inHyper Text Markup Language (HTML), Extensible Markup Language (XML), orother suitable markup language.

The present disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsherein that a person having ordinary skill in the art would comprehend.Similarly, where appropriate, the appended claims encompass all changes,substitutions, variations, alterations, and modifications to the exampleembodiments herein that a person having ordinary skill in the art wouldcomprehend.

1-20. (canceled)
 21. A method comprising: by a server computing device,receiving from a client computing device a request for a view of a userinterface of a native application executing on the client computingdevice, wherein the view includes one or more first user-interfacecomponents, and wherein the native application is an applicationinstalled locally on the client computing device; by a server computingdevice, determining a user agent type of the client computing device; bya server computing device, selecting one or more second user-interfacecomponents based on the user agent type of the client computing device,the one or more second user-interface components being associated with anative feature of the client computing device, the native featurecomprising a hardware or software component native to thesecond-computing device; by a server computing device, generating codeimplementing a structured document that represents the view, thestructured document comprising the one or more first user-interfacecomponents and the one or more second user-interface components; and bya server computing device, sending the code to the client computingdevice.
 22. The method of claim 21, further comprising: by a servercomputing device, receiving from the client computing device anapplication programming interface call to the server computing device,the call initiated by a user input to the client computing devicethrough the one or more user-interface components; and by a servercomputing device, sending to the client computing device a response tothe call.
 23. The method of claim 21, wherein each second user-interfacecomponent is associated with a customized uniform resource locator (URL)referring to the native feature.
 24. The method of claim 21, wherein thecode is in Hypertext Markup Language (HTML).
 25. The method of claim 21,wherein the user agent type comprises an identification of the nativeapplication.
 26. The method of claim 21, wherein the native featurecomprises a sensor native to the client computing device.
 27. The methodof claim 21, wherein the native feature comprises an operating systemexecuting on the client computing device.
 28. One or more non-transitorycomputer-readable storage media embodying software that is operable whenexecuted by a server computing device to: receive from a clientcomputing device a request for a view of a user interface of a nativeapplication executing on the client computing device, wherein the viewincludes one or more first user-interface components, and wherein thenative application is an application installed locally on the clientcomputing device; determine a user agent type of the client computingdevice; select one or more second user-interface components based on theuser agent type of the client computing device, the one or more seconduser-interface components being associated with a native feature of theclient computing device, the native feature comprising a hardware orsoftware component native to the second-computing device; generate codeimplementing a structured document that represents the view, thestructured document comprising the one or more first user-interfacecomponents and the one or more second user-interface components; andsend the code to the client computing device.
 29. The media of claim 28,wherein the software is further operable when executed to: receive fromthe client computing device an application programming interface call tothe server computing device, the call initiated by a user input to theclient computing device through the one or more user-interfacecomponents; and send to the client computing device a response to thecall.
 30. The media of claim 28, wherein each second user-interfacecomponent is associated with a customized uniform resource locator (URL)referring to the native feature.
 31. The media of claim 28, wherein thecode is in Hypertext Markup Language (HTML).
 32. The media of claim 28,wherein the user agent type comprises an identification of the nativeapplication.
 33. The media of claim 28, wherein the native featurecomprises a sensor native to the client computing device.
 34. The mediaof claim 28, wherein the native feature comprises an operating systemexecuting on the client computing device.
 35. A system comprising: oneor more non-transitory computer-readable storage media embodyinginstructions; one or more processors coupled to the storage media andconfigured to execute the instructions to: receive from a clientcomputing device a request for a view of a user interface of a nativeapplication executing on the client computing device, wherein the viewincludes one or more first user-interface components, and wherein thenative application is an application installed locally on the clientcomputing device; determine a user agent type of the client computingdevice; select one or more second user-interface components based on theuser agent type of the client computing device, the one or more seconduser-interface components being associated with a native feature of theclient computing device, the native feature comprising a hardware orsoftware component native to the second-computing device; generate codeimplementing a structured document that represents the view, thestructured document comprising the one or more first user-interfacecomponents and the one or more second user-interface components; andsend the code to the client computing device.
 36. The system of claim35, wherein the processors are further configured to execute theinstructions to: receive from the client computing device an applicationprogramming interface call to the server computing device, the callinitiated by a user input to the client computing device through the oneor more user-interface components; and send to the client computingdevice a response to the call.
 37. The system of claim 35, wherein eachsecond user-interface component is associated with a customized uniformresource locator (URL) referring to the native feature.
 38. The systemof claim 35, wherein the code is in Hypertext Markup Language (HTML).39. The system of claim 35, wherein the native feature comprises asensor native to the client computing device.
 40. The system of claim35, wherein the native feature comprises an operating system executingon the client computing device.